<?php
/**
 * Created by PhpStorm.
 * User: zouhua
 * Date: 2017/5/5
 * Time: 16:14
 */

namespace app\actions;


use app\models\ActivityApply;
use yii\db\ActiveQuery;

class UserApplyList extends UserList {

    public function beforeRun() {
        if (!parent::beforeRun()) {
            return FALSE;
        }

        $id = $this->getParam('id');
        $this->where = ['pub_uid' => $this->user->id, 'aid' => $id];
        $this->with = ['activity', 'user'];
        $this->modelClass = ActivityApply::className();
        $this->_view = 'apply-list';

        $this->layout = 'detail';
        $this->orderBy = 'status asc, id desc';
        return TRUE;
    }
}